/**
* @file      main.c
* @author    Simran Agarwal
* @version   1.0
* @date      December 06, 2014
* @brief     main file for running the project

/* Includes -----------------------------------------------------------------------*/
#include "arduino.h"

/* Private types ------------------------------------------------------------------*/
/* Private constants --------------------------------------------------------------*/
/* Private macro ------------------------------------------------------------------*/
/* Private variables --------------------------------------------------------------*/
/* Private function prototypes ----------------------------------------------------*/
/* Private functions --------------------------------------------------------------*/

/**
* @brief	The setup() function will only run once, after each powerup or reset of the board. Use it to initialize pin modes.
* @param	None
* @retval	None
*/
void setup()
{
	pinMode(13, OUTPUT);
	pinMode(12, OUTPUT);
	pinMode(11, OUTPUT);
	pinMode(10, OUTPUT);
	pinMode(9, OUTPUT);
	
	pinMode(2, INPUT);
	pinMode(3, INPUT);
	pinMode(4, INPUT);
	pinMode(5, INPUT);
	pinMode(6, INPUT);
}


/**
* @brief	The loop() function does loop consecutively, allowing your program to change and respond. Use it to actively control the board.
* @param	None
* @retval	None
*/
void loop()
{
	 int val1 = digitalRead(2);
	 int val2 = digitalRead(3);
	 int val3 = digitalRead(4);
	 int val4 = digitalRead(5);
	 int val5 = digitalRead(6);
	
	 if (val1 == HIGH) {
		digitalWrite(13, HIGH);
	 } else {
		digitalWrite(13, LOW);		
	 }
	 if (val2 == HIGH) {
		digitalWrite(12, HIGH);
	 } else {
		digitalWrite(12, LOW);		
	 }
	 if (val3 == HIGH) {
		digitalWrite(11, HIGH);
	 } else {
		digitalWrite(11, LOW);		
	 }
	 if (val4 == HIGH) {
		digitalWrite(10, HIGH);
	 } else {
		digitalWrite(10, LOW);		
	 }
	 if (val5 == HIGH) {
		digitalWrite(9, HIGH);
	 } else {
		digitalWrite(9, LOW);		
	 }
}


/**
* @brief	main function
* @param	None
* @retval	None
*/

int main() 
{
	platform_config();
	setup();
	while(1) {
		loop();
	}
}
